package services.impl;

import beans.Ordertable;
import dao.OrdertableDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import services.OrderServices;

import java.util.List;

@Service
public class OrderServicesImpl implements OrderServices {

    @Autowired
    private OrdertableDao orderDao;

    @Override
    public List<Ordertable> selectList() {
        List<Ordertable> list = orderDao.selectList();
        return list;
    }

    @Override
    public List<Ordertable> selectSelective(String selectText, String inputText) {
        List<Ordertable> list = orderDao.selectSelective(selectText,inputText);
        return list;
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        int i = orderDao.deleteByPrimaryKey(id);
        return i;
    }

    @Override
    public int insert(Ordertable record) {
        int i = orderDao.insert(record);
        return i;
    }

    @Override
    public int insertSelective(Ordertable record) {
        int i = orderDao.insertSelective(record);
        return i;
    }

    @Override
    public Ordertable selectByPrimaryKey(Integer id) {
        Ordertable order = orderDao.selectByPrimaryKey(id);
        return order;
    }

    @Override
    public int updateByPrimaryKeySelective(Ordertable record) {
        int i = orderDao.updateByPrimaryKeySelective(record);
        return i;
    }

    @Override
    public int updateByPrimaryKey(Ordertable record) {
        int i = orderDao.updateByPrimaryKey(record);
        return i;
    }

    @Override
    public int count() {
        return orderDao.count();
    }
}
